Images in HTML

In order to put a simple image on a webpage, we use the <img> element. This is an empty element,meaning that it has no text content or closing tag.
It requires a minimum of one attribute to be useful — src .The src attribute contains a path pointing to the image you want to embed in the page, which can be a relative or absolute URL


width and height attributes

You can use the width and height attributes to specify the width and height of your image.


Image Title

As with links, you can also add title attributes to images, to provide further supporting information if needed.This gives us a tooltip on mouse hover, just like link titles.
Here is an example:



Videos in HTML


The <video> element allows you to embed a video very easily.

The src attribute specifies the path of the video you want to embed.
The controls attribute is used to control parameters like height and width of video, start and end points of playback.


Here is an example: